package com.yuandian.management.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuandian.management.vo.AgentIpPojo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * agent管理
 * 
 * @author fucx
 * @date 2020/06/11
 */
@Mapper
public interface AgentIpMapper extends BaseMapper<AgentIpPojo> {

    /**
     * 查询所有ip
     * 
     * @return
     */
    public List<AgentIpPojo> queryListAll();

    /**
     * 查询正常状态的所有ip
     * 
     *
     * @param zeroToday
     * @param searchKey
     * @return
     */
    public List<AgentIpPojo> queryList(@Param("searchKey") String searchKey, @Param("zeroToday") String zeroToday);

    /**
     * 插入AgentIp
     * 
     * @param agentIp
     */
    public void insertAgentIp(AgentIpPojo agentIp);

    /**
     * 根据id更新AgentIp
     * 
     * @param agentIp
     * @return
     */
    public int updateByPrimaryKey(AgentIpPojo agentIp);

    /**
     * 根据ip更新AgentIp
     * 
     * @param agentIp
     * @return
     */
    public int updateByIpSelective(AgentIpPojo agentIp);

    /**
     * 根据ip更新状态为逻辑删除
     * 
     * @param ipArray
     * @return
     */
    public void updateStatusByAgentIp(String[] ipArray);

    /**
     * 统计正常的agentip个数
     * 
     * @return
     */
    public int countNormalAgentIp();

}
